import requests from './request'
import mockRequest from './mockRequest'

export const reqCategoryList = () => requests.get('/product/getBaseCategoryList')
export const reqGetBannerList = () => mockRequest.get(`/banner`)
export const reqFloorList = () => mockRequest.get(`/floor`)
export const reqGetSearchInfo = (params)=>requests({url:"/list",method:"post",data:params})
export const reqGoodsInfo = (skuid) => requests.get(`/item/${skuid}`)
export const reqAddOrUpdateShopCart = (skuId,skuNum)=>requests({url:`/cart/addToCart/${skuId}/${skuNum}`, method:'post'});
export const reqShopCartList = ()=>request({url:'/cart/cartList',method:'get'});
export const reqDeleteCartById = (skuId)=>request({url:`/cart/deleteCart/${skuId}`,method:'delete'});
export const reqUpdateCartChecked = (skuId,isChecked)=>request({url:`/cart/checkCart/${skuId}/${isChecked}`,method:'get'});